\(\int \frac {(e+f x) \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx\) [267]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [F(-2)]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 29, antiderivative size = 98 \[ \int \frac {(e+f x) \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx=-\frac {i f x}{4 a d}-\frac {f \cosh (c+d x)}{a d^2}+\frac {(e+f x) \sinh (c+d x)}{a d}+\frac {i f \cosh (c+d x) \sinh (c+d x)}{4 a d^2}-\frac {i (e+f x) \sinh ^2(c+d x)}{2 a d} \]

[Out]

-1/4*I*f*x/a/d-f*cosh(d*x+c)/a/d^2+(f*x+e)*sinh(d*x+c)/a/d+1/4*I*f*cosh(d*x+c)*sinh(d*x+c)/a/d^2-1/2*I*(f*x+e)
*sinh(d*x+c)^2/a/d

Rubi [A] (verified)

Time = 0.07 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {5682, 3377, 2718, 5554, 2715, 8} \[ \int \frac {(e+f x) \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx=-\frac {f \cosh (c+d x)}{a d^2}+\frac {i f \sinh (c+d x) \cosh (c+d x)}{4 a d^2}-\frac {i (e+f x) \sinh ^2(c+d x)}{2 a d}+\frac {(e+f x) \sinh (c+d x)}{a d}-\frac {i f x}{4 a d} \]

[In]

Int[((e + f*x)*Cosh[c + d*x]^3)/(a + I*a*Sinh[c + d*x]),x]

[Out]

((-1/4*I)*f*x)/(a*d) - (f*Cosh[c + d*x])/(a*d^2) + ((e + f*x)*Sinh[c + d*x])/(a*d) + ((I/4)*f*Cosh[c + d*x]*Si
nh[c + d*x])/(a*d^2) - ((I/2)*(e + f*x)*Sinh[c + d*x]^2)/(a*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2715

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Sin[c + d*x])^(n - 1)/(d*n))
, x] + Dist[b^2*((n - 1)/n), Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integ
erQ[2*n]

Rule 2718

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3377

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 5554

Int[Cosh[(a_.) + (b_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.)*Sinh[(a_.) + (b_.)*(x_)]^(n_.), x_Symbol] :> Simp[(c +
 d*x)^m*(Sinh[a + b*x]^(n + 1)/(b*(n + 1))), x] - Dist[d*(m/(b*(n + 1))), Int[(c + d*x)^(m - 1)*Sinh[a + b*x]^
(n + 1), x], x] /; FreeQ[{a, b, c, d, n}, x] && IGtQ[m, 0] && NeQ[n, -1]

Rule 5682

Int[(Cosh[(c_.) + (d_.)*(x_)]^(n_)*((e_.) + (f_.)*(x_))^(m_.))/((a_) + (b_.)*Sinh[(c_.) + (d_.)*(x_)]), x_Symb
ol] :> Dist[1/a, Int[(e + f*x)^m*Cosh[c + d*x]^(n - 2), x], x] + Dist[1/b, Int[(e + f*x)^m*Cosh[c + d*x]^(n -
2)*Sinh[c + d*x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 1] && EqQ[a^2 + b^2, 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {i \int (e+f x) \cosh (c+d x) \sinh (c+d x) \, dx}{a}+\frac {\int (e+f x) \cosh (c+d x) \, dx}{a} \\ & = \frac {(e+f x) \sinh (c+d x)}{a d}-\frac {i (e+f x) \sinh ^2(c+d x)}{2 a d}+\frac {(i f) \int \sinh ^2(c+d x) \, dx}{2 a d}-\frac {f \int \sinh (c+d x) \, dx}{a d} \\ & = -\frac {f \cosh (c+d x)}{a d^2}+\frac {(e+f x) \sinh (c+d x)}{a d}+\frac {i f \cosh (c+d x) \sinh (c+d x)}{4 a d^2}-\frac {i (e+f x) \sinh ^2(c+d x)}{2 a d}-\frac {(i f) \int 1 \, dx}{4 a d} \\ & = -\frac {i f x}{4 a d}-\frac {f \cosh (c+d x)}{a d^2}+\frac {(e+f x) \sinh (c+d x)}{a d}+\frac {i f \cosh (c+d x) \sinh (c+d x)}{4 a d^2}-\frac {i (e+f x) \sinh ^2(c+d x)}{2 a d} \\ \end{align*}

Mathematica [A] (verified)

Time = 2.71 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.61 \[ \int \frac {(e+f x) \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {i f \cosh (c+d x) (4 i+\sinh (c+d x))+d (e+f x) (-i \cosh (2 (c+d x))+4 \sinh (c+d x))}{4 a d^2} \]

[In]

Integrate[((e + f*x)*Cosh[c + d*x]^3)/(a + I*a*Sinh[c + d*x]),x]

[Out]

(I*f*Cosh[c + d*x]*(4*I + Sinh[c + d*x]) + d*(e + f*x)*((-I)*Cosh[2*(c + d*x)] + 4*Sinh[c + d*x]))/(4*a*d^2)

Maple [A] (verified)

Time = 6.80 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.15

method result size
risch \(-\frac {i \left (2 d f x +2 d e -f \right ) {\mathrm e}^{2 d x +2 c}}{16 a \,d^{2}}+\frac {\left (d f x +d e -f \right ) {\mathrm e}^{d x +c}}{2 a \,d^{2}}-\frac {\left (d f x +d e +f \right ) {\mathrm e}^{-d x -c}}{2 a \,d^{2}}-\frac {i \left (2 d f x +2 d e +f \right ) {\mathrm e}^{-2 d x -2 c}}{16 a \,d^{2}}\) \(113\)
derivativedivides \(-\frac {-\frac {i c f \cosh \left (d x +c \right )^{2}}{2}+\frac {i d e \cosh \left (d x +c \right )^{2}}{2}+i f \left (\frac {\left (d x +c \right ) \cosh \left (d x +c \right )^{2}}{2}-\frac {\sinh \left (d x +c \right ) \cosh \left (d x +c \right )}{4}-\frac {d x}{4}-\frac {c}{4}\right )+\sinh \left (d x +c \right ) c f -\sinh \left (d x +c \right ) d e -f \left (\left (d x +c \right ) \sinh \left (d x +c \right )-\cosh \left (d x +c \right )\right )}{d^{2} a}\) \(120\)
default \(-\frac {-\frac {i c f \cosh \left (d x +c \right )^{2}}{2}+\frac {i d e \cosh \left (d x +c \right )^{2}}{2}+i f \left (\frac {\left (d x +c \right ) \cosh \left (d x +c \right )^{2}}{2}-\frac {\sinh \left (d x +c \right ) \cosh \left (d x +c \right )}{4}-\frac {d x}{4}-\frac {c}{4}\right )+\sinh \left (d x +c \right ) c f -\sinh \left (d x +c \right ) d e -f \left (\left (d x +c \right ) \sinh \left (d x +c \right )-\cosh \left (d x +c \right )\right )}{d^{2} a}\) \(120\)

[In]

int((f*x+e)*cosh(d*x+c)^3/(a+I*a*sinh(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

-1/16*I*(2*d*f*x+2*d*e-f)/a/d^2*exp(2*d*x+2*c)+1/2*(d*f*x+d*e-f)/a/d^2*exp(d*x+c)-1/2*(d*f*x+d*e+f)/a/d^2*exp(
-d*x-c)-1/16*I*(2*d*f*x+2*d*e+f)/a/d^2*exp(-2*d*x-2*c)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.94 \[ \int \frac {(e+f x) \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {{\left (-2 i \, d f x - 2 i \, d e + {\left (-2 i \, d f x - 2 i \, d e + i \, f\right )} e^{\left (4 \, d x + 4 \, c\right )} + 8 \, {\left (d f x + d e - f\right )} e^{\left (3 \, d x + 3 \, c\right )} - 8 \, {\left (d f x + d e + f\right )} e^{\left (d x + c\right )} - i \, f\right )} e^{\left (-2 \, d x - 2 \, c\right )}}{16 \, a d^{2}} \]

[In]

integrate((f*x+e)*cosh(d*x+c)^3/(a+I*a*sinh(d*x+c)),x, algorithm="fricas")

[Out]

1/16*(-2*I*d*f*x - 2*I*d*e + (-2*I*d*f*x - 2*I*d*e + I*f)*e^(4*d*x + 4*c) + 8*(d*f*x + d*e - f)*e^(3*d*x + 3*c
) - 8*(d*f*x + d*e + f)*e^(d*x + c) - I*f)*e^(-2*d*x - 2*c)/(a*d^2)

Sympy [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 321 vs. \(2 (82) = 164\).

Time = 0.30 (sec) , antiderivative size = 321, normalized size of antiderivative = 3.28 \[ \int \frac {(e+f x) \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx=\begin {cases} \frac {\left (\left (- 512 a^{3} d^{7} e e^{2 c} - 512 a^{3} d^{7} f x e^{2 c} - 512 a^{3} d^{6} f e^{2 c}\right ) e^{- d x} + \left (512 a^{3} d^{7} e e^{4 c} + 512 a^{3} d^{7} f x e^{4 c} - 512 a^{3} d^{6} f e^{4 c}\right ) e^{d x} + \left (- 128 i a^{3} d^{7} e e^{c} - 128 i a^{3} d^{7} f x e^{c} - 64 i a^{3} d^{6} f e^{c}\right ) e^{- 2 d x} + \left (- 128 i a^{3} d^{7} e e^{5 c} - 128 i a^{3} d^{7} f x e^{5 c} + 64 i a^{3} d^{6} f e^{5 c}\right ) e^{2 d x}\right ) e^{- 3 c}}{1024 a^{4} d^{8}} & \text {for}\: a^{4} d^{8} e^{3 c} \neq 0 \\\frac {x^{2} \left (- i f e^{4 c} + 2 f e^{3 c} + 2 f e^{c} + i f\right ) e^{- 2 c}}{8 a} + \frac {x \left (- i e e^{4 c} + 2 e e^{3 c} + 2 e e^{c} + i e\right ) e^{- 2 c}}{4 a} & \text {otherwise} \end {cases} \]

[In]

integrate((f*x+e)*cosh(d*x+c)**3/(a+I*a*sinh(d*x+c)),x)

[Out]

Piecewise((((-512*a**3*d**7*e*exp(2*c) - 512*a**3*d**7*f*x*exp(2*c) - 512*a**3*d**6*f*exp(2*c))*exp(-d*x) + (5
12*a**3*d**7*e*exp(4*c) + 512*a**3*d**7*f*x*exp(4*c) - 512*a**3*d**6*f*exp(4*c))*exp(d*x) + (-128*I*a**3*d**7*
e*exp(c) - 128*I*a**3*d**7*f*x*exp(c) - 64*I*a**3*d**6*f*exp(c))*exp(-2*d*x) + (-128*I*a**3*d**7*e*exp(5*c) -
128*I*a**3*d**7*f*x*exp(5*c) + 64*I*a**3*d**6*f*exp(5*c))*exp(2*d*x))*exp(-3*c)/(1024*a**4*d**8), Ne(a**4*d**8
*exp(3*c), 0)), (x**2*(-I*f*exp(4*c) + 2*f*exp(3*c) + 2*f*exp(c) + I*f)*exp(-2*c)/(8*a) + x*(-I*e*exp(4*c) + 2
*e*exp(3*c) + 2*e*exp(c) + I*e)*exp(-2*c)/(4*a), True))

Maxima [F(-2)]

Exception generated. \[ \int \frac {(e+f x) \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx=\text {Exception raised: RuntimeError} \]

[In]

integrate((f*x+e)*cosh(d*x+c)^3/(a+I*a*sinh(d*x+c)),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: THROW: The catch RAT-ERR is undefined.

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.41 \[ \int \frac {(e+f x) \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx=-\frac {{\left (2 i \, d f x e^{\left (4 \, d x + 4 \, c\right )} - 8 \, d f x e^{\left (3 \, d x + 3 \, c\right )} + 8 \, d f x e^{\left (d x + c\right )} + 2 i \, d f x + 2 i \, d e e^{\left (4 \, d x + 4 \, c\right )} - 8 \, d e e^{\left (3 \, d x + 3 \, c\right )} + 8 \, d e e^{\left (d x + c\right )} + 2 i \, d e - i \, f e^{\left (4 \, d x + 4 \, c\right )} + 8 \, f e^{\left (3 \, d x + 3 \, c\right )} + 8 \, f e^{\left (d x + c\right )} + i \, f\right )} e^{\left (-2 \, d x - 2 \, c\right )}}{16 \, a d^{2}} \]

[In]

integrate((f*x+e)*cosh(d*x+c)^3/(a+I*a*sinh(d*x+c)),x, algorithm="giac")

[Out]

-1/16*(2*I*d*f*x*e^(4*d*x + 4*c) - 8*d*f*x*e^(3*d*x + 3*c) + 8*d*f*x*e^(d*x + c) + 2*I*d*f*x + 2*I*d*e*e^(4*d*
x + 4*c) - 8*d*e*e^(3*d*x + 3*c) + 8*d*e*e^(d*x + c) + 2*I*d*e - I*f*e^(4*d*x + 4*c) + 8*f*e^(3*d*x + 3*c) + 8
*f*e^(d*x + c) + I*f)*e^(-2*d*x - 2*c)/(a*d^2)

Mupad [B] (verification not implemented)

Time = 1.31 (sec) , antiderivative size = 144, normalized size of antiderivative = 1.47 \[ \int \frac {(e+f x) \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx=-{\mathrm {e}}^{-c-d\,x}\,\left (\frac {f+d\,e}{2\,a\,d^2}+\frac {f\,x}{2\,a\,d}\right )-{\mathrm {e}}^{-2\,c-2\,d\,x}\,\left (\frac {\left (f+2\,d\,e\right )\,1{}\mathrm {i}}{16\,a\,d^2}+\frac {f\,x\,1{}\mathrm {i}}{8\,a\,d}\right )+{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (\frac {\left (f-2\,d\,e\right )\,1{}\mathrm {i}}{16\,a\,d^2}-\frac {f\,x\,1{}\mathrm {i}}{8\,a\,d}\right )-{\mathrm {e}}^{c+d\,x}\,\left (\frac {f-d\,e}{2\,a\,d^2}-\frac {f\,x}{2\,a\,d}\right ) \]

[In]

int((cosh(c + d*x)^3*(e + f*x))/(a + a*sinh(c + d*x)*1i),x)

[Out]

exp(2*c + 2*d*x)*(((f - 2*d*e)*1i)/(16*a*d^2) - (f*x*1i)/(8*a*d)) - exp(- 2*c - 2*d*x)*(((f + 2*d*e)*1i)/(16*a
*d^2) + (f*x*1i)/(8*a*d)) - exp(- c - d*x)*((f + d*e)/(2*a*d^2) + (f*x)/(2*a*d)) - exp(c + d*x)*((f - d*e)/(2*
a*d^2) - (f*x)/(2*a*d))